package com.techstar.ats.codec.history.encoder;

import io.netty.buffer.ByteBuf;
import com.techstar.ats.codec.DateTimeCodec;
import com.techstar.ats.codec.MessageEncoder;
import com.techstar.ats.dxp.history.req.F21LoadHistoryTgData;

public enum F21LoadHistoryTgDataEncoder implements MessageEncoder<F21LoadHistoryTgData> {
	INSTANCE;

	public void encodeBody(ByteBuf buf, F21LoadHistoryTgData value) {
		buf.writeShort(value.line);
		DateTimeCodec.INSTANCE.encode(buf, value.datetime);
		buf.writeByte(value.type.value());
	}

	public int bytes(F21LoadHistoryTgData value) {
		return 10;
	}
}
